import { createStore } from 'vuex'
//配置数据储存持久化
import VuexPersistence from "vuex-persist"
const vuexLocal = new VuexPersistence({
  storage: window.localStorage
})

export default createStore({
  state: {
    token:"1"
  },
  getters: {
  },
  mutations: {
    setToken(state,token){
      state.token=token;
    }
  },
  actions: {
  },
  modules: {
  },
  //配置数据储存持久化
  plugins:[vuexLocal.plugin]
})
